// 盒子基础设置
@mixin boxBase($w:100%,$h:100%,$r:null,$bg:null){
  width: $w;
  height: $h;
  @if $r{
    border-radius: $r;
  }
  @if $bg{
    background-color: $bg;
  }
}
// 字体基础属性
@mixin fontBase($fz,$fw:null,$ff:null){
  font-size: $fz;
  @if $fw{
    font-weight: $fw;
  }
  @if $ff {
    font-family: $ff;
  }
}


@mixin flex($dir:row, $main:flex-start, $cross:stretch) {
  display: flex;
  flex-direction: $dir;
  justify-content: $main;
  align-items: $cross;
}

@mixin themeBgColor ($light-color:#ffffff,$night-color:#000000) {
  [data-theme="light"] & {
    background-color: $light-color;
  }
  [data-theme="night"] & {
    background-color: $night-color;
  }
}

@mixin themeColor ($light-color:#ffffff,$night-color:#000000) {
  [data-theme="light"] & {
    color: $light-color;
  }
  [data-theme="night"] & {
    color: $night-color;
  }
}

@mixin themeShadow ($light-color:0 0 12px 0 #7c7c7c,$night-color:0 0 12px 0 #000000) {
  [data-theme="light"] & {
    box-shadow: $light-color;
  }
  [data-theme="night"] & {
    box-shadow: $night-color;
  }
}

@mixin themeBorder (
  $w,
  $light-color:$theme-color-light,
  $night-color:$theme-color-night,
  $location:'around') {

  [data-theme="light"] & {
    border-color: $light-color;
  }
  [data-theme="night"] & {
    border-color: $night-color;
  }

  @if str_index($location,'top') {
    border-top: $w solid;
  }

  @if str_index($location,'right') {
    border-right: $w solid;
  }

  @if str_index($location,'bottom') {
    border-bottom: $w solid;
  }

  @if str_index($location,'left') {
    border-left: $w solid;
  }

  @if str_index($location,'around') {
    border: $w solid;
  }

}




























